﻿namespace BPM.Web.Shared.Data;

/// <summary>
/// 树基类
/// </summary>
public interface ITreeNode<TItem, Tkey> where TItem : class where Tkey : struct
{
    /// <summary>
    /// 获取设置 子节点
    /// </summary>
    public IEnumerable<TItem> Children { get; set; }

    /// <summary>
    /// 获取节点id
    /// </summary>
    /// <returns></returns>
    Tkey GetId();

    /// <summary>
    /// 获取节点父id
    /// </summary>
    /// <returns></returns>
    Tkey GetPid();
}
